/**
 * @file setting_sd_auto_mount.h
 *
 */
#ifndef SETTING_SD_AUTO_MOUNT_H
#define SETTING_SD_AUTO_MOUNT_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_watch_conf.h"
#else
#include "../../../lvgl/lvgl.h"
#include "../../../lv_watch_conf.h"
#endif

#if USE_LV_WATCH_SD_AUTO_MOUNT != 0
/*********************
 *      DEFINES
 *********************/
#define SETTING_CAPTURE_SD_APP_BLUETOOTH     0x01
#define SETTING_CAPTURE_SD_APP_AUDIO_PLAYER  0x02
#define SETTING_CAPTURE_SD_APP_IMGVIEWER     0x04
/**********************
 *      TYPEDEFS
 **********************/
typedef struct {
    lv_watch_obj_ext_t lv_watch_obj;
    /*New data for this type */
    lv_obj_t * cb_on;
    lv_obj_t * cb_off;
} lv_sd_auto_mount_obj_ext_t;

typedef struct {
    bool sd_auto_mount;
    uint8_t capture_sd_app;
} setting_sd_auto_mount_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
void sd_auto_mount_create_btn_action(lv_obj_t * btn, lv_event_t event);
void sd_auto_mount_init(nv_watch_settings_t * nvsettings);
extern bool setting_sd_mount_capture_check(uint8_t app_type);
extern void setting_sd_mount_app_release(uint8_t app_type);
extern void setting_sd_mount_capture_by_usb(void);
extern void setting_sd_mount_remove(void);
extern void setting_sd_mount_on_clear_ui(void);
extern void setting_sd_mount_off_clear_ui(void);
extern void setting_sd_mount_common_destory_capture_app(void);
extern bool setting_get_release_capture_app_proc(void);
extern void setting_set_release_capture_app_proc(bool status);

/**********************
 *      MACROS
 **********************/

#endif /* USE_LV_WATCH_SD_AUTO_MOUNT */

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* SETTING_SD_AUTO_MOUNT_H */
